//
//  SASelectAddressCell.m
//  saasRetail
//
//  Created by 黄志刚 on 2021/8/23.
//

#import "SASelectAddressCell.h"

@interface SASelectAddressCell ()

@property (nonatomic, strong) UILabel *titleLab;

@end

@implementation SASelectAddressCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self initUI];
    }
    return self;
}

-(void)refreshData:(NSString *)area AndSelectArea:(NSString *)selectArea {
    self.titleLab.text = area;
    if ([selectArea isEqualToString:area]) {
        self.titleLab.textColor = kPinkColor;
    }else {
        self.titleLab.textColor = kBlackColor;
    }
}

-(void)initUI {
    UILabel *titleLab = [[UILabel alloc] initWithFrame:SARectMake(26, 0, 300, 35)];
    titleLab.textColor = kBlackColor;
    titleLab.font = kFont(14);
    titleLab.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:titleLab];
    self.titleLab = titleLab;
}

@end
